package com.gclife.controller;

import io.swagger.annotations.*;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "test", description = "测试 REST API")
@RefreshScope
@RestController
public class TestController {

    @GetMapping(value = "/")
    public String printServiceB() {
        return "Hello Gclife-Service-Test01";
    }

    @ApiOperation(value = "Hello", notes = "test")
    @ApiImplicitParams({

    })
    @ApiResponses({
            @ApiResponse(code = 200, message = "请求成功"),
    })
    @GetMapping(value = "/hello")
    public String hello(@RequestParam(name = "name", required = true) String name) {
        return "Hello " + name;
    }
}